import request from '../utils/request'

// 根据id查询仓库
export function getById (id) {
  return request.get(`/warehouse/${id}`)
}

// 获取仓库列表
export function getWarehouse (params) {
  return request.get('/warehouse', { params: params })
}

// 添加仓库
export function addWarehouse (data) {
  return request.post('/warehouse', data)
}

// 修改仓库
export function modWarehouse (id, data) {
  return request.put(`/warehouse/${id}`, data)
}

// 删除仓库
export function deleWarehouse (id) {
  return request.delete(`/warehouse/${id}`)
}
